--- import Layout from '@layouts/Layout.astro'; import Button from '@components/form/Button.astro'; import Main from '@components/scafold/MainCard.astro'; import ServiceList from '@components/things/ServiceList.astro'; import type { AwesomePrivacy, Section, Service, ShortService } from '../types/Service'; import { fetchData, slugify } from '@utils/fetch-data'; import { parseMarkdown } from '@utils/parse-markdown'; interface Props { slug: string, title: string, services: Service[], intro?: string, notableMentions?: ShortService[] | string, furtherInfo?: string, wordOfWarning?: string, alternativeTo?: string[]; categoryName: string, otherSections: Section[], } const { title, otherSections, services, notableMentions, furtherInfo, wordOfWarning, alternativeTo, categoryName, intro, } = Astro.props; /** * Make a list of keywords, for the tag */ const makeKeyWordTag = () => { const keywords = []; keywords.push(`free and open source ${title} software`); keywords.push(`private ${title} comparison`); (alternativeTo || []).forEach((alt: string) => { keywords.push(`privacy-respecting ${alt} alternative`); keywords.push(`free open source ${alt} alternative`); }); (services || []).forEach((serv: Service) => { keywords.push(serv.name); }); keywords.push('ad free'); keywords.push('open source software'); keywords.push('privacy respecting apps'); return keywords.join(', '); }; /** * Make a page title */ const makePageTitle = () => { return `${title} | Awesome Privacy`; }; /** * Make a string page intro, for the description tag */ const makeDescriptionTag = () => { let description = `Privacy respecting ${title}. `; if (services && services.length > 0) { const serviceList = services.map((serv: Service) => serv.name); description += `Compare ${serviceList.join(' vs ')} and more private, open source apps and services now. ` } else { description += `Find private apps and services. This section is still a work in progress. `; } if (alternativeTo && alternativeTo.length > 0) { description += `The best secure encrypted alternatives to ${alternativeTo.join(', ')} in 2024. `; } description += 'All this, and many more free and awesome tools and software.' return description; }; export async function getStaticPaths() { const pages = await fetchData().then((data) => { const results: Array = []; if (!data || !data.categories) return results; (data as AwesomePrivacy).categories.forEach((category) => { const sections = category.sections.map((section) => ({ slug: `${slugify(category.name)}/${slugify(section.name)}`, title: section.name, services: section.services, intro: section.intro, notableMentions: section.notableMentions, furtherInfo: section.furtherInfo, wordOfWarning: section.wordOfWarning, alternativeTo: section.alternativeTo, categoryName: category.name, otherSections: category.sections, })); results.push(...sections); }); return results; }); return pages.map((props: Props) => { return {params: { section: props.slug }, props }; }); } const makePaginationLinks = () => { const index = otherSections.findIndex(section => section.name === title); const previousSection = index > 0 ? otherSections[index - 1].name : null; const nextSection = index < otherSections.length - 1 ? otherSections[index + 1].name : null; return { previous: previousSection, next: nextSection }; }; const { previous, next } = makePaginationLinks(); ---

{title}

{intro && (

)}
Objective of this page

Find the best free, open source, E2E encrypted and private alternative to {(alternativeTo || []).map((alt) => ({alt}, ))} now.

Compare {(services || []).map((serv) => ({serv.name} vs ))}

Discover the best {title} tools for Android, iPhone, Linux, PC and Chrome to download now. And choose secure, self-hosted, peer-to-peer and independant alternatives in 2024

Stop the invasion of privacy from big tech, improve data security stay safe.

{notableMentions && (

Notable Mentions

{ Array.isArray(notableMentions) ?
    {notableMentions.map((mention) => (
  • {mention.name} {mention.description && ( - )}
  • ))}
:

}
)} {furtherInfo && (

Notes

)} {wordOfWarning && (

Word of Warning

)} {services.length > 0 && (

Submit New Entry

Are we missing anything? You can help us improve this page, by submitting a new entry

)}
{ previous ? ( ) :

} View all in {categoryName} ({otherSections.length}) { next && ( )}